package com.scut.fy.auth.feign;

import com.scut.fy.auth.feign.fallback.SysUserServiceFallback;
import com.scut.fy.common.web.util.HttpResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * TODO
 *
 * @author JY
 * @version 1.0
 * @date 2021/8/20
 */
@FeignClient(name = "fy-admin", fallback = SysUserServiceFallback.class)
public interface SysUserService {

    /**
     * 通过用户ID查询用户信息
     * @param userId
     * @return
     */
    @PostMapping("/sysUser/findById")
    HttpResult<Map<String, Object>> findUserByUserId(@RequestParam("userId") Integer userId);

    /**
     * 通过用户名查询用户信息
     * @param userName
     * @return
     */
    @PostMapping("/sysUser/findByName")
    HttpResult<Map<String, Object>> findUserByUserName(@RequestParam("userName") String userName);
}
